<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>首页</title>
	</head>
	<body>
		<div id="tableId" style="height: 300px;width: calc(100% - 16px);"></div>
		<link rel="stylesheet" type="text/css" href="../css/simple-table.css" />
		<script type="application/javascript" src="../js/jquery-2.1.0.js"></script>
		<script type="application/javascript" src="../js/simple-table.js"></script>
		<script type="application/javascript">
			
			var data = [
				{name: "曾曾曾", gender: "男", age: "16"},
				{name: "韩梅梅", gender: "女", age: "16"},
				{name: "李杰", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "钟繇囍", gender: "男", age: "16"},
				{name: "陈嘟嘟", gender: "男", age: "16"}
			];
			
			$(function() {
				$.simTable.create({
					elem: "#tableId",	//容器选择器
					page: true,	//是否分页
					resize: true,	//大小自适应
					sizeOption: [2, 40, 50],	//自定义行数选择器
					data: data,	//静态数据
//					url: "http://localhost:3000/users/test",
//					params: {},
//					cols: [
//						{field: "menu_code", name : "菜单编号", width: "20%"},
//						{field: "menu_name", name : "菜单名称", width: "20%"},
//						{field: "level", name : "级别", width: "20%"},
//						{field: "sort_num", name : "排序", width: "20%"},
//						{field: "operate", name : "操作", width: "20%", align: "center", render: function(val, row) {
//							return "<a href='javascript:void(0);' onclick='alert(\""+row.id+"\")'>查看</a>";
//						}}
//					]
					cols: [
						{field: "name", name : "姓名", width: "60%"},
						{field: "gender", name : "性别", width: "20%"},
						{field: "age", name : "年龄", width: "20%"}
					]
				});
			});
		</script>
	</body>
</html>
